﻿@model MvcAtletIS.Models.CheckPoints

@{
    ViewBag.Title = "Check-pointy";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Check-pointy: @ViewBag.DisciplineList.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Pridať check-point</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.OrderInDiscipline)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OrderInDiscipline)
            @Html.ValidationMessageFor(model => model.OrderInDiscipline)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Code)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Code)
            @Html.ValidationMessageFor(model => model.Code)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PcId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PcId)
            @Html.ValidationMessageFor(model => model.PcId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LapCount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LapCount)
            @Html.ValidationMessageFor(model => model.LapCount)
        </div>

        <p>
            <input type="submit" value="Pridať" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Naspať na prehľad check-pointov", "Index", new { disciplineListId = @ViewBag.DisciplineList.ID})
</div>
